<include file="Public:pagerForm" />
{//导入jquery}
<script src="/Public/Js/jquery.js"></script>
<script src="/Public/Js/my.js"></script>

<!-- 主页面开始 -->
<div id="main" class="main" >

    <!-- 主体内容  -->
    <div class="content" >
        <div class="title">产品资料 </div>
        <!--  功能操作区域  -->
        <div class="operate" >
        <form name="search" method="get" action="__URL__/search" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)" >
        <div>搜索产品<input type="text" name="key" id="key" /><input name="s" id="s" value="搜索" type="button" onclick="searchgoods()"/>
</form>
       </div>		
  </div>
        <!-- 功能操作区域结束 -->
        <!-- 列表显示区域  -->
        <div class="list" >
            <html:list id="checkList" style="list" name="action" checkbox="true" action="true" datasource="list" show="category:分类,brand:品牌,product_code:产品编号,product_name:产品名称,unit:单位,price:单价,purchase_price:进货价,commission:提成成本,lower:下限,integral:积分" actionlist="add_purchase:添加:id" />
        </div>
        <!--  分页显示区域 -->
        <div class="page">{$page}</div>
        <!-- 列表显示区域结束 -->
          <div id="hiddendata" style="display:none;">
<table width="100%" border="1">
  <tr>
    <td>序号</td>
    <td>选择系列</td>
    <td>选择品名（无名称则直接填写）</td>
    <td>规格</td>
    <td>编号</td>
    <td>申购预算</td>
    <td>申购数量</td>
    <td>备注说明</td>
    <td><input type="button"  id="additem" value="增加条目"  onclick="goodssearch()" /></td>
  </tr>
  <!--申购数据-->
  <tr class="product" style="display:none;" id="0"></tr>
  <volist name="list" id="data">
  <tr class="product" id="{$data.id}">
  <input type="hidden" name="items[{$data.id}][id]"  value="{$data.id}"/>
  <input type="hidden" name="items[{$data.id}][category]"  value="{$data.category}"/>
  <input type="hidden" name="items[{$data.id}][product_name]"  value="{$data.product_name}"/>
  <input type="hidden" name="items[{$data.id}][unit]"  value="{$data.unit}"/>
  <input type="hidden" name="items[{$data.id}][product_code]"  value="{$data.product_code}"/>
    <td><span class="order">{$i}</span></td>
    <td>{$data.category}</td>
    <td>{$data.product_name}</td>
    <td>{$data.unit}</td>
    <td>{$data.product_code}</td>
    <td><input type="hidden" name="items[{$data.id}][purchase_price]" value="{$data.purchase_price}"/><input type="text" name="items[{$data.id}][money]" value="{$data.purchase_price}"/>元</td>
    <td><input type="text" name="items[{$data.id}][number]"  value="{$data.number}"/></td>
    <td><input type="text" name="items[{$data.id}][note]"  value=""/></td>
    <td><input type="button"  value="移除条目"  onclick="removeitem({$data.id})"/></td>
  </tr>
  <tr class="sum">
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>合计</td>
    <td><span id="summoney"></span></td>
    <td><span id="sumnumber"></span></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  </volist>
</table>      
         </div>        
    </div>
    <!-- 主体内容结束 --><!-- 主页面结束 -->